<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="top.fleamarket.domain.User"%>
<script type="text/javascript">
//退出确认框
function confirm_logout() {   
    var msg = "您确定要退出登录吗？";   
    if (confirm(msg)==true){   
    return true;   
    }else{   
    return false;   
    }   
} 
</script>
<div id="divhead" style="padding:10px 150px 10px 150px">


<div class="naver">

   <ul class="" style="margin:0;padding:0">   
   <li>
<!-- <div id="divhead2" style="position:absolute;padding:0px;margin:10px;"> -->

				<a href="${pageContext.request.contextPath }/index.jsp" style="line-height:auto">
					<img src="${pageContext.request.contextPath}/client/images/logo.png" style="margin:0px;border:0px;width:40px;height:40px"/> 
				</a>
<!-- 	</div> -->

	          </li>
	                       
			<li id="mosaier" class="">
				<a href="${pageContext.request.contextPath}/showProductByPage" target="_blank">

					<span>图书专区</span>
				</a>
			</li>
			<li id="caidan" class="">
				<a href="electron.jsp" target="_blank">

					<span>电子专区</span>
				</a>
			</li>
			<li id="caidan" class="">
				<a href="everyday.jsp" target="_blank" class="link-instanted">

					<span>日用品专区</span>
				</a>
			</li>
			<li id="caidan" class="">
				<a href="other.jsp" target="_blank">

					<span>其他物品</span>
				</a>
			</li>

</ul>
	            </div>
<div style="float:right;padding:0px;margin:10px;font-size:16px">

				
				   &nbsp;
				  <a href="${pageContext.request.contextPath}/client/cart.jsp">购物车</a> 
				| <a href="#">帮助中心</a> 
				<% 
				User user = (User) request.getSession().getAttribute("user");
				if(null == user){
				%>
				| <a href="${pageContext.request.contextPath}/myAccount">登录</a>
				<%
				}else{
				%>
				| <a href="${pageContext.request.contextPath }/myAccount">个人中心：${user.username }</a>
				<%
				}
				%>
				<% 

				if(null == user){
				%>
				| <a href="${pageContext.request.contextPath}/client/register.jsp">注册</a>							
				<% 	
				}else{
				%>
				| <a href="${pageContext.request.contextPath}/logout" onclick="javascript:return confirm_logout()">用户退出</a>
	
				<% 	
				}
				%>			

</div>
</div>